/*
 * File Name: View.java
 *------------------------------------------------------------------------------
 * Copyright 2012 NCR Corporation
 *------------------------------------------------------------------------------
 * All revision information is updated automatically from source code control
 * change records - please do not manually edit.
 *------------------------------------------------------------------------------
 *
 * $LastChangedRevision:: 1693                                     $
 * $LastChangedBy:: rb250096                                       $
 * $LastChangedDate:: 2012-03-01 01:12:48 -0500 (Thu, 01 Mar 2012) $
 */

package com.ncr.nep.dashboardcore.mvp.client;

import com.google.gwt.event.logical.shared.HasAttachHandlers;

/**
 * Defines a view within an MVP object hierarchy.
 * 
 * @author rb250096
 * @version $Revision: 1693 $
 */
public interface View extends HasAttachHandlers {

    //--------------------------------------------------------------------------
    //
    //  Properties
    //
    //--------------------------------------------------------------------------

    /**
     * Gets the {@link Presenter} associated with the view.
     *
     * @return The view's Presenter.
     */
    Presenter<?> getPresenter();

    /**
     * Sets the {@link Presenter} instance used to manage this view.
     *
     * @param presenter The {@link Presenter} instance used to manage this view.
     */
    void setPresenter(Presenter<?> presenter);

    //--------------------------------------------------------------------------
    //
    //  Methods
    //
    //--------------------------------------------------------------------------

    /**
     * Initializes the view.
     */
    void init();

    /**
     * Performs cleanup operations on the view when it is no longer needed.
     */
    void dispose();
}
